package com.samsung.eci.wiki.control;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.samsung.eci.wiki.bean.WikiPages;
import com.samsung.eci.wiki.service.WikiPagesService;

@Controller
@RequestMapping("/wikipages")
public class WikiPagesController {
	@Autowired
	private WikiPagesService wikiPagesService;

	/*@RequestMapping("/list.do")
	@ResponseBody
	public String getUserList(HttpServletRequest request) {
		List<OAUser> userList = userService.getUserList();
		return JSON.toJSONString(userList);
	}
	
	@RequestMapping("/user")
	public String group(HttpServletRequest request) {
		return "leave/userlist";
	}*/
	@RequestMapping("/addWiki")
	@ResponseBody
	public String addWikiPages(WikiPages wikiPages,String content){
		wikiPages.setWikiId(1);
		int count = wikiPagesService.insert(wikiPages,content);
		return String.valueOf(count);
	}

}
